package com.woniuxy.SpringAOP;




import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import java.lang.reflect.Method;

public class QieMian implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        xianzhixing();
        Object proceed = invocation.proceed();
        houzhixing();
        return proceed;
    }

    public void xianzhixing(){
        System.out.println("先执行");
    }

    public void houzhixing(){
        System.out.println("后执行");
    }
}
